package mybatis;

import mybatis.bean.User;
import mybatis.utils.DBUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class Test {
    @Autowired
    private User uesr;
    public static void main(String[] args) {
        SqlSessionFactory sf = DBUtils.obtionsqlSessionFactory();
        SqlSession ss = sf.openSession();
        List<User> users = ss.selectList("selectUser",2);
        System.out.println(users.get(0).getName());
    }
}
